Conversation
- utils: formatDate emits en-AU D/MM/YYYY without leading-zero day - ui: Button renders aria-label, with fallback for icon-only buttons - ui: DataTable sort toggle uses functional state update (stale closure) - web: import renamed useDebounce instead of useThrottle - config: root bunfig preloads DOM setup; tsconfig loads bun-types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
bun test && tsc --noEmitnow passes from the repo root: 13 tests pass, 0 fail, and tsc exits 0. No test files were modified and no dependencies were added.apps/web/src/lib/api.tsuseThrottle, which was renamed touseDebounceinpackages/utils. The publicuseSearchDebouncere-export still works.packages/ui/src/components/Button/Button.tsxaria-labelis now rendered on the<button>. Icon-only buttons get a fallback name and a dev-only warning.packages/ui/src/components/DataTable/DataTable.tsxhandleSort. It now uses the functionalsetSortDir(prev => ...).packages/utils/src/format/date.tsformatDategave01/03/2024. It now gives en-AU1/03/2024/15/06/2024: no leading zero on the day, 4-digit year.bunfig.tomlenvironment = "happy-dom"is not a real Bun option, so a barebun testnever set up a DOM. It now preloads the existingpackages/ui/test/setup.ts.tsconfig.json"types": ["bun-types"]sobun:testresolves under tsc.Assumptions
D/MM/YYYY, taken from the comments in the date tests. A first attempt withdateStyle: "short"passed but produced a 2-digit year, so it was replaced after review.formatDateTimeis unchanged and still uses the short style.aria-labelis non-null, so a runtime fallback is required. Making the label required in the type would break tsc on that test. The fallback value"Button"doesn't describe the button to screen-reader users. A follow-up should make callers always pass a real label.bun run testalready passed--preloadon the command line. The task runs a barebun test, which needs the root bunfig fix.